package com.pro.domain;
/*CREATE TABLE `evaluation` (
        `evaluation_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '评价编号',
        `content` varchar(255) NOT NULL COMMENT '短评内容',
        `score` int(255) NOT NULL COMMENT '评分-5分制',
        `create_time` datetime NOT NULL COMMENT '创建时间',
        `member_id` bigint(20) NOT NULL COMMENT '会员编号',
        `book_id` bigint(20) NOT NULL COMMENT '图书编号',
        `enjoy` int(255) NOT NULL DEFAULT '0' COMMENT '点赞数量',
        `state` varchar(16) NOT NULL DEFAULT 'enable' COMMENT '审核状态 enable-有效 disable-已禁用',
        `disable_reason` varchar(255) DEFAULT NULL COMMENT '禁用理由',
        `disable_time` datetime DEFAULT NULL COMMENT '禁用时间',
        PRIMARY KEY (`evaluation_id`)
        ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;*/

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

@TableName("evaluation")
public class Evaluation {
    @TableId(type = IdType.AUTO)
    private Long evaluationId;
    private Long bookId;
    private String content;
    private Integer score;
    private Long memberId; //会员编号
    private Date createTime;
    private Integer enjoy; //点赞数
    private String state; //审核状态 enable有效 disable禁用
    private String disableReason; //禁用理由
    private Date disableTime; //禁用时间

    @TableField(exist = false) //表示表中不存在对应的字段，不会参与到sql的自动生成
    private Book book;         //这个对象，需要我们自己手动查询得到

    @TableField(exist = false)
    private Member member;

    public Member getMember() {
        return member;
    }

    public void setMember(Member member) {
        this.member = member;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Book getBook() {
        return book;
    }

    public void setBook(Book book) {
        this.book = book;
    }

    public Long getEvaluationId() {
        return evaluationId;
    }

    public void setEvaluationId(Long evaluationId) {
        this.evaluationId = evaluationId;
    }

    public Long getBookId() {
        return bookId;
    }

    public void setBookId(Long bookId) {
        this.bookId = bookId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public Long getNumberId() {
        return memberId;
    }

    public void setNumberId(Long numberId) {
        this.memberId = numberId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getEnjoy() {
        return enjoy;
    }

    public void setEnjoy(Integer enjoy) {
        this.enjoy = enjoy;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getDisableReason() {
        return disableReason;
    }

    public void setDisableReason(String disableReason) {
        this.disableReason = disableReason;
    }

    public Date getDisableTime() {
        return disableTime;
    }

    public void setDisableTime(Date disableTime) {
        this.disableTime = disableTime;
    }
}
